package mid;

import java.util.Arrays;

public class a1753_移除石子的最大得分 {
    int count=0;
    public int maximumScore(int a, int b, int c) {
        int ans[]=new int[3];
        ans[0]=a;
        ans[1]=b;
        ans[2]=c;
        Arrays.sort(ans);
        if (ans[0]!=0){
            ans[0]--;
            ans[2]--;
            count++;
            maximumScore(ans[0],ans[1],ans[2]);
        } else if (ans[1]!=0) {
            ans[1]--;
            ans[2]--;
            count++;
            maximumScore(ans[0],ans[1],ans[2]);
        }
        return count;
    }

}
